Combine flour, baking powder and salt. Rub in the softened butter, then add sugar, yolks and sour cream.
Knead briefly until smooth, wrap and refrigerate for 30 minutes.
Lightly grease and preheat a walnut cookie mold according to its directions. Roll teaspoon-sized portions and put one in each cavity.
Close the mold and cook about 1–2 minutes per side or until golden. Remove carefully and cool the shells completely.
Mix dulce de leche with walnuts and optional flavoring. Fill each shell with about a teaspoon of filling as space allows and join two halves.
Refrigerate the finished cookies for a few hours or overnight to soften slightly.