The headteacher has written to parents after a pupil was hit with a pellet fired from outside the school premises