We study the two-body problem with a spatially modulated interaction potential using a two-channel model, in which the inter-channel coupling is provided by an optical standing wave and its strength modulates periodically in space. As the modulation amplitudes increases, there will appear a sequence of bound states. Part of them will cause divergence of the effective scattering length, defined through the phase shift in the asymptotic behavior of scattering states. We also discuss how the local scattering length, defined through short-range behavior of scattering states, modulates spatially in different regimes. These results provide a theoretical guideline for new control technique in cold atom toolbox, in particular, for alkali-earth-(like) atoms where the inelastic loss is small.