Add the first 7 ingredients to a 2-pound bread machine according to the manufacturers directions. Select the dough cycle. When cycle is complete, remove dough from machine. Punch down. Cover and let rest for 10 minutes.
Meanwhile, in a medium mixing bowl beat together almond paste, the 1/4 cup granulated sugar, 1 tablespoon all-purpose flour and 1 egg yolk until smooth. (Or, combine the ingredients in a food processor bowl. Cover and process until the mixture clings together.)
On a lightly floured surface, roll dough into a 27x10-inch rectangle. Cut into twelve 10x2-1/4-inch strips. Divide almond mixture into 12 portions; roll each portion into a 9-1/2-inch-long rope. Place a rope lengthwise down center of each strip of dough. Fold dough in half lengthwise to enclose filling; moisten edges of dough; seal. Place, seams down, on greased large baking sheets. Form each filled strip into a heart shape; moisten ends and pinch together at base of heart to seal.
Cover and let rise in a warm place for 30 to 40 minutes or until nearly double. If desired, brush with a little milk and sprinkle with coarse sugar. Bake in a 350 degree F. oven for 12 to 15 minutes or until golden. Remove from baking sheets; cool on wire racks. Makes 12.