Optimal focusing of laser radiation on the surface of a solid target