Preheat the oven to 350°F (175°C).
Grease and flour a 9-inch round cake pan.
In a bowl, cream together the softened butter and sugar until light and fluffy.
Add eggs one at a time, mixing well after each addition.
Stir in the vanilla extract and sour cream until combined.
In another bowl, whisk together flour, baking powder, baking soda, and salt.
Gradually add the dry ingredients to the wet mixture, mixing until just combined.
Fold in the chopped nuts if using.
Pour the batter into the prepared cake pan and smooth the top.
Bake for 40-45 minutes or until a toothpick comes out clean.