Coherent acoustic phonons are generated at terahertz frequencies when semiconductor quantum-well nanostructures are illuminated by femtosecond laser pulses. These phonons - also known as nanoacoustic waves - typically have wavelengths of tens of nanometres, which could prove useful in applications such as non-invasive ultrasonic imaging and sound amplification by the stimulated emission of radiation. However, optical diffraction effects mean that the nanoacoustic waves are produced with spot sizes on the micrometre scale. Near-field optical techniques can produce waves with smaller spot sizes, but they only work near surfaces. Here, we show that a far-field optical techniqu - which suffers no such restriction - can be used to spatially manipulate the phonon generation process so that nanoacoustic waves are emitted with lateral dimensions that are much smaller than the laser wavelength. We demonstrate that nanoacoustic waves with wavelengths and spot sizes of the order of 10 nm and 100 nm, respectively, can be generated and detected.