Using an electric mixer on medium speed, cream butter until soft and fluffy. Add egg yolks and mix well. In a separate bowl, stir together granulated sugar, flour, baking powder, and salt. Add to the butter mixture and mix just until incorporated and the dough starts to come together. The dough will be crumbly at first; scrape down the sides of the bowl and mix again until it becomes more cohesive.
Divide the dough in two and flatten into disks. Wrap each in plastic wrap and freeze at least two hours or overnight.
Heat oven to 350°. Remove one disk of dough from the freezer. Coarsely grate the dough onto the bottom of an ungreased 9x9-inch baking pan. Gently pat down the dough so it forms a smooth surface. With a spatula, spread jam over the surface to within ½ inch of the edge all the way around.
Remove the remaining dough from the freezer and coarsely grate it over the entire surface. Bake until light golden brown, about 30 to 40 minutes. Dust with confectioners´ sugar, if desired. Cool the pan on a wire rack.
When completely cooled, cut the shortbread lengthwise into four strips, then crosswise into nine strips, forming 2-¼-inch cookies.