By developing quasi-discrete multiple-scale method combined with tight-binding approximation, a novel quadratic Riccati differential equation is first derived for the soliton dynamics of the condensed bosons trapped in the optical lattices. For a lack of exact solutions, the trial solutions of the Riccati equation have been analytically explored for the condensed bosons with various scattering length as. When the lattice depth is rather shallow, the results of sub-fundamental gap solitons are in qualitative agreement with the experimental observation. For the deeper lattice potentials, we predict that in the case of as>0, some novel intrinsically localized modes of symmetrical envelope, topological (kink) envelope, and anti-kink envelope solitons can be observed within the bandgap in the system, of which the amplitude increases with the increasing lattice spacing and (or) depth. In the case of as<0, the bandgap brings out intrinsically localized gray or black soliton. This well provides experimental protocols to realize transformation between the gray and black solitons by reducing light intensity of the laser beams forming optical lattice.