Preheat the oven to 375˚F. Line a 9 x 9-inch baking pan with foil or parchment paper. To make the filling, melt 2 tablespoons butter in a large skillet over medium heat. Stir in the apple slices, sugar, cinnamon and nutmeg. Cook, stirring occasionally, under the apples are golden brown and caramelized, about 15 minutes. Remove from the heat.
Meanwhile, prepare the dough. In a medium mixing bowl, combine the flour, oats, sugars, baking powder, salt and cinnamon and stir to blend. Add in the butter pieces and cut into the dry ingredients using a pastry cutter or two knives until the mixture resembles coarse meal. Add in the egg yolk and vanilla and stir with a fork or knead very briefly just until a crumbly dough comes together. Transfer about two thirds of the dough mixture to the prepared baking pan and press down into an even layer. Bake until light golden, about 12-14 minutes.
While the base is baking, combine the caramels and cream in a medium saucepan set over medium heat. Melt the caramels, stirring occasionally, until the mixture is totally smooth. Remove from the heat. Once the base layer is baked, pour the caramel over the top. Layer with the cooked apple slices. Crumble the remaining dough over the top of the apple slices. Sprinkle evenly with the chopped nuts, if using.
Bake about 22-25 minutes or until the top is golden brown. Transfer the pan to a wire rack to cool. Let cool completely before slicing and serving.