Preheat your oven to 350°F (175°C). Grease a 9x5-inch loaf pan or line it with parchment paper.
In a large mixing bowl, cream together the softened butter, cream cheese, granulated sugar, and brown sugar until smooth and fluffy.
Add the mashed bananas, eggs, and vanilla extract to the mixture. Beat until well combined.
In another bowl, whisk together the flour, baking soda, baking powder, and salt.
Gradually add the dry ingredients to the wet mixture, stirring until just combined. Be careful not to overmix.
If using, fold in the chopped walnuts or pecans.
Pour the batter into the prepared loaf pan and smooth the top.
Bake for 60-70 minutes, or until a toothpick inserted into the center comes out clean.
Allow the bread to cool in the pan for about 10 minutes before transferring it to a wire rack to cool completely.