We explore the feasibility of exciting localized spin-wave modes in ferromagnetic nanostructures using surface acoustic waves. The time-resolved Faraday effect is used to probe the magnetization dynamics of an array of nickel nanowires. The optical-pump pulse excites both spin-wave modes of the nanowires and acoustic modes of the substrate and we observe that, when the frequencies of these modes coincide, the amplitude of magnetization dynamics is substantially enhanced due to magnetoelastic coupling between the two. Notably, by tuning the magnitude of an externally applied magnetic field, optically excited surface acoustic waves can selectively excite either the upper or lower branches of a splitting in the nanowire's spin-wave spectrum, which micromagnetic simulations indicate is caused by localization of spin waves in different parts of the nanowire. Thus, our results indicate the feasibility of using acoustic waves to selectively excite spatially confined spin waves, an approach that may find utility in future magnonic devices where coherent structural deformations could be used as coherent sources of propagating spin waves.