Controlling the Electronic, Structural, and Optical Properties of Novel MgTiO3/LaNiO3 Nanostructured Films for Enhanced Optoelectronic Devices