In a small heavy saucepan, melt the unsweetened chocolate, the butter, and 1 cup of semisweet chocolate over low heat, stirring constantly. Remove from heat and cool at room temperature.
In a small bowl, stir together the flour, cocoa powder, baking powder, and salt in a small bowl. Set aside.
In a large mixing bowl, beat the sugar, eggs, and vanilla with an electric mixer for 2 minutes.
Beat in the cooled chocolate mixture. Beat in the dry ingredients until well combined. Stir in the remaining semisweet chocolate pieces and the pecans or walnuts, if you like. Cover and chill the dough for at least 1 hour (dough will become stiff after chilling).
Drop dough by rounded teaspoons 2 inches apart on greased cookie sheets.
Bake in a 350 degree F oven for 10 minutes or until the edges are firm. Remove cookies to a wire rack to cool.