Preheat oven to 350 degrees F. Line a 9x9x2-inch baking pan with foil, extending foil over edges of pan. Lightly grease foil; set aside. Break up cookie dough into a large bowl. Stir in oats until combined. Stir in milk chocolate pieces, semisweet chocolate pieces, and, if desired, nuts.
Pat mixture into prepared baking pan. Bake in the preheated oven for 20 minutes or until light brown. Cool in pan on a wire rack. Use the foil to lift uncut bars out of pan. Cut into bars.