We describe a convenient approach for measuring the velocity vSAW of surface acoustic waves (SAWs) of the near-surface layer of a material through optical pump-probe measurements. The method has a lateral spatial resolution of <10 μm and is sensitive to the elastic constants of the material within ≈300 nm of the surface. SAWs with a wavelength of 700 nm and 500 nm are generated and detected using an elastomeric polydimethylsiloxane phase-shift mask which is fabricated using a commercially available Si grating as a mold. Time-domain electromagnetics calculations show, in agreement with experiment, that the efficiency of the phase-shift mask for generating and detecting SAWs decreases rapidly as the periodicity of the mask decreases below the optical wavelength. We validate the experimental approach using bulk and thin film samples with known elastic constants.