The geometry of overlap between two nuclei interacting at high energy determines many of the observables typically investigated in heavy-ion-collision analyses, such as average transverse momenta (<pt>) and azimuthal anisotropies of the emitted particle distributions. If the colliding nuclei are non-spherical, e.g., if they present a quadrupole deformation and look like ellipsoids, the geometry of interaction experiences nontrivial fluctuations due to the random orientation of the colliding bodies. I introduce an 'event-shape engineering' procedure that allows one to probe the quadrupole deformation of the colliding ions. The method is straightforward. One selects a batch of high-multiplicity (ultracentral) collisions, and within this batch looks at events that present an abnormally large or small <pt> of the produced hadrons. I show that these events correspond to configurations in which the colliding nuclei are overlapping along the longer (shorter) side of the prolate (oblate) ellipsoids. In these events, the interaction region has an elliptical shape, whose eccentricity is closely related to the quadrupole deformation of the considered nuclei. Therefore, for collisions of nuclei that are significantly deformed (e.g. 238U and 129Xe nuclei collided at RHIC and LHC) I predict a strong enhancement of elliptic flow in the tails of the <pt> distributions of ultracentral events. If validated by experimental data, this method would provide a robust tool to observe the deformations of nuclear ground states at particle colliders (in particular at RHIC).