Preheat your oven to 350°F (175°C) and grease a 9x13 inch baking pan or line it with parchment paper for easy removal.
In a large mixing bowl, whisk together the flour, rolled oats, brown sugar, granulated sugar, baking powder, baking soda, and salt.
Pour in the melted butter and mix until the dry ingredients are fully incorporated and crumbly. Reserve 1 cup of this mixture for the topping.
Press the remaining crumb mixture into the bottom of the prepared baking pan to form an even crust. Bake in the preheated oven for 10-12 minutes until the edges start to turn golden brown.
While the crust is baking, prepare the apple filling. In another bowl, combine the diced apples, cinnamon, and half of the caramel sauce (about 1/2 cup). Toss until the apples are well coated.
Once the crust is done, remove it from the oven and spread the apple mixture evenly over the warm crust.
Drizzle the remaining caramel sauce over the apples, then sprinkle the reserved crumb mixture on top, along with the chopped walnuts if using.
Bake for an additional 25-30 minutes, or until the topping is golden brown and the apples are tender.
Allow the bars to cool completely in the pan before slicing them into squares or rectangles.
Notes
Serve warm or at room temperature with whipped cream or vanilla ice cream.