Preheat the oven to 360 degrees F. Grease a 9-by-5-inch bread tin and line the base with greased baking paper.
In a large bowl, cream together the butter, sugar, and vanilla until light and fluffy, then add the eggs one at a time. Beat until thoroughly combined. In a separate bowl, mix together the banana, sour cream, and lemon juice. In another bowl, sift together the flour, baking powder, baking soda, and salt. Add half the banana mixture to the egg mixture, followed by half the flour mixture. Fold until well combined, then repeat with the remaining ingredients. Lastly, fold in the chopped nuts. Pour the batter into a prepared pan and smooth with a spatula. Bake about 1 hour. Allow to cool in tin for a few minutes before turning onto a wire rack. When the cake has cooled completely, spread with the frosting.
Cream together the butter, cream cheese, and vanilla until smooth. Add the powdered sugar half a cup at a time and beat with an electric mixer on low speed until combined. When all the powdered sugar is added, beat on high speed until the frosting is smooth. Spread on the cooled cake.
Sprinkle the chopped pecans or walnuts on top of the frosted cake, if desired.