Preheat oven to 350°F (175°C) and grease a 9x9-inch pan.
Make the streusel topping: Mix brown sugar, granulated sugar, cinnamon, and optional nuts in a small bowl. Set aside.
In a medium bowl, whisk together flour, baking soda, baking powder, and salt.
In a large bowl, cream butter and granulated sugar until light and fluffy.
Beat in eggs one at a time, then stir in vanilla extract.
Alternately add the flour mixture and sour cream, starting and ending with flour.
Pour half of the batter into the pan, sprinkle with half the streusel topping. Repeat with remaining batter and topping.
Bake for 40–45 minutes, or until a toothpick inserted in the center comes out clean.
Let cool for 10 minutes before serving warm or at room temperature.