Exact solution of the Schrödinger equation for the central nonpolynomial potential V(r)=r2+λr2/(1+gr2) in two and three dimensions