Theoretical investigations show that linearly and radially polarized multiterawatt and petawatt laser beams, focused to subwavelength waist radii, can directly accelerate protons and carbon nuclei, over micron-size distances, to the energies required for hadron cancer therapy. Ions accelerated by radially polarized lasers have generally a more favorable energy spread than those accelerated by linearly polarized lasers of the same intensity.