Preheat oven to 350ºF/ 180°C/ Fan 160. Line an 8-inch square baking pan with aluminium foil; spray foil lightly with cooking spray.
In a medium bowl, whisk together flour, cocoa, salt, and baking powder. Set aside.
With an electric mixer, cream butter and sugar at medium speed for 2 to 3 minutes, or until combined. Add egg, egg whites, vanilla, and coffee. Continue beating until incorporated.
Scrape down sides of the bowl, and reduce mixer speed to low. Slowly add flour mixture to the bowl, followed by yogurt, and mix gently until combined. The batter will be thick. Stir in chocolate and walnuts if using.
With a spatula, spread mixture evenly in pan and bake for 20 to 25 minutes, or until a toothpick inserted in centre of pan comes out dry. Cool on a wire rack before removing from pan and slicing into 16 squares.