Those are called plum curculios. They affect both peaches and plums. Apply a general-purpose fruit tree spray starting in the pink bud stage in late winter (buds are fully swollen, but none has yet opened). Repeat the treatment when 75 percent of the petals have fallen and, thereafter, on 3-week intervals until harvest. Hopefully you'll get them before they ruin the fruit.