Helioseismology provides important constraints for the solar dynamo problem. However, the basic properties and even the depth of the dynamo process, which operates also in other stars, are unknown. Most of the dynamo models suggest that the toroidal magnetic field that emerges on the surface and forms sunspots is generated near the bottom of the convection zone, in the tachocline. However, there is a number of theoretical and observational problems with justifying the deep-seated dynamo models. This leads to the idea that the subsurface angular velocity shear may play an important role in the solar dynamo. Using helioseismology measurements of the internal rotation and meridional circulation, we investigate a mean-field MHD model of dynamo distributed in the bulk of the convection zone but shaped in a near-surface layer. We show that if the boundary conditions at the top of the dynamo region allow the large-scale toroidal magnetic fields to penetrate into the surface, then the dynamo wave propagates along the isosurface of angular velocity in the subsurface shear layer, forming the butterfly diagram in agreement with the Parker-Yoshimura rule and solar-cycle observations. Unlike the flux-transport dynamo models, this model does not depend on the transport of magnetic field by meridional circulation at the bottom of the convection zone, and works well when the meridional circulation forms two cells in radius, as recently indicated by deep-focus time-distance helioseismology analysis of the SDO/HMI and SOHO/MDI data. We compare the new dynamo model with various characteristics if the solar magnetic cycles, including the cycle asymmetry (Waldmeiers relations) and magnetic `butterfly diagrams.