Preheat your oven to 350°F (175°C). Grease a 9x9-inch baking dish.
In a large bowl, combine the mashed bananas, melted butter, and vanilla extract. Mix until well blended.
In another bowl, whisk together the flour, oats, brown sugar, granulated sugar, baking powder, cinnamon, and salt.
Gradually add the dry ingredients to the banana mixture, stirring until just combined. If using, fold in the chopped nuts.
Pour the batter into the prepared baking dish, spreading it evenly.
Bake in the preheated oven for 25-30 minutes, or until the top is golden brown and a toothpick inserted in the center comes out clean.
Allow to cool for about 10 minutes before serving.