Preheat oven to 375. Butter a 9 x 13 inch baking pan and line with parchment paper so that there are overhanging flaps on two sides.
Combine flours, oats, baking powder, and salt in a medium bowl
In a stand mixer, beat the butter and sugar until light and fluffy. Add the eggs one at a time, scraping down the sides after each one. Add in the flour and mix until just combined.
Press 2/3 of the dough into the bottom of the pan so that it is even. Spread the jam on top, then scatter the fresh raspberries. Take the remaining dough and scatter it in clumps on top of the jam. Sprinkle the nuts overtop if using.
Bake 45 minutes until golden, then cool on the counter 10 minutes. Lift the bars out using the parchment, and place on a cutting board. Cut into bars and serve. They will keep wrapped for 2 days.