Put half the wafer crumbs in the bottom of an 8x8-inch pan. Cream butter and sugar in a mixing bowl. Stir in egg yolks, chocolate, walnuts, and vanilla extract. Beat egg whites until stiff peaks form; fold egg whites into batter. Pour batter over wafer crumbs, and smooth it out. Sprinkle remaining wafer crumbs on top. Refrigerate at least 1 hour before serving.
Remove from refrigerator and let sit for 5-10 minutes. Remove and cut into serving-size squares. Top with whipped cream, if desired.