Currently, two-dimensional materials are widely studied from both theoretical and experimental points of view. Among a large list of systems, one finds a two-dimensional boron allotrope (borophene), which has attracted considerable attention due to its promising electronic and optical properties. Understanding and modifying these properties are crucial for implementation of borophene in high-technological applications, but for this to be possible we need to know its very basic physical properties. Therefore, in this work we study borophene that belongs to the P-mmm phase group via first principles to examine the variation of the optoelectronic properties of a pristine borophene monolayer, and the one with Al and Ga substitutional impurities. We report the band structure with the correspondingly density of the states for the pristine system as well as for the doped borophene one. We do reproduce the optical conductivity for the pristine borophene obtained from the complex dielectric function considering several values of the scattering time parameter (τ) of Drude-like model. In addition, here we report the effect of the impurities on the optical conductivity, with the same set of τ parameters, as well as the absorption coefficient with x- and y-polarized incident light. We have found that impurities significantly modify the optical conductivity, but, most importantly, this also enhances the absorption coefficient in the visible region of the electromagnetic spectrum.