Density Functional Theory (DFT) is employed to study the various optical properties of pseudo-cubic LaNiO3. As LaNiO3 is a strongly correlated material, conventional DFT like LDA or GGA and even GW approximation fail to describe, we have examined the optical spectra of this compound using GGA(PBE)+U approach. The advantage of incorporating Hubbard U in this approach is to take the strong electronic correlation in the system into account. The optical spectra of this compound are found to be consisted of the Drude peak and some high energy peaks. While the Drude peak reflects the dominant free carrier contributions at the low energy region, the high energy peaks originate from the inter-band transitions within the system. We have also studied the remarkable changes in the optical properties in Fe doped LaNiO3 (LaNi1-xFexO3), in order to probe related properties, corresponding to their applications in solid-oxide fuel cells. Our calculations have revealed that even 25% of Fe doping is adequate to trigger a first order metal to insulator transition in LaNiO3. The optical spectra of LaNi1-xFexO3 compounds are calculated using the hybrid functional HSE and the doping-induced metal to insulator transition in LaNiO3 is attributed to the altered crystal environment and electronic configuration of the compound.