The ability to control the optical field in the vicinity of an individual nano-object is an obvious stepping-stone in the tailoring of light-matter interactions at the nanoscale. Earlier reports on tailoring light fields in the vicinity of a nano-object have been restricted by their dependence on cumbersome optical or fabrication techniques, have relied mostly on in-plane electric field polarizations, and have been demonstrated only for bulk materials and structures with strong in-plane anisotropies. In addition, traditional methods for manipulating the longitudinal electric fields are significantly hindered by the lack of appropriate probes that can be used to unambiguously measure or calibrate the light coupling efficiency to nano-objects. Here, we demonstrate such a possibility for the specific case of optical second-harmonic generation (SHG). Our technique relies on spatial phase-shaping of a high-order laser beam to tailor the longitudinal fields at the beam focus and allows SHG from an individual and well-defined vertically-aligned GaAs nanowire to be manipulated on demand. Our technique is applicable to tailoring the efficiency of nonlinear emission on the nanoscale and to arbitrary polarization control at the beam focus in general.