Theoretical study of electronic and optical properties in doped quantum structures with Razavy confining potential: effects of external fields