Apparatus for slotting, slitting or perforating the surface of pieces of dough