Preheat the oven to 350°F (175°C).
In a mixing bowl, combine the flour, sugar, cocoa powder, and salt. Whisk until well mixed.
In another bowl, whisk together the melted butter, eggs, and vanilla extract until smooth.
Gradually add the wet ingredients to the dry ingredients, stirring until just combined. The batter will be thick.
Fold in the chocolate chips and nuts (if using).
Pour the batter into the prepared pie pan, spreading it out evenly.
Bake in the preheated oven for 30 minutes, or until the edges are set but the center is still slightly soft.
Remove from the oven and allow to cool for a few minutes. The center will continue to firm up as it cools.
Serve warm, topped with a scoop of vanilla ice cream if desired.