Fruit trees including pears are prone to insects and diseases like the black spot you have. Start early with a good fruit tree spray that contains a fungicide. Follow the directions and spraying schedule on the package and you should enjoy spot free fruit.