Preheat oven to 375°F. Grease a 6 or 8 cup baking dish and set aside.
Peel apples, and cut into slices.
Place apples into baking dish. Sprinkle with sugar and flour, tossing to coat. Set aside.
Make the topping by mixing together the oats, sugar, butter, flour, and apple pie spice with a pastry cutter or fork. Once fully mixed, stir in nuts if using. Spoon topping on top of fruit, pressing down lightly.
Bake 30-35 minutes, or until bubbling on the edges and apples are cooked through. If it starts to brown but the fruit is not ready, cover loosely with foil or parchment and bake for 5 more minutes. If still not ready, check after 3 minutes until it is cooked to your liking.
Let cool for 5 minutes to thicken the fruit mixture before serving.