Energy harvesting from sunlight is essential in order to save fossil fuels, which are found in limited amount in the earth's crust. Photovoltaic devices converting light into electrical energy are presently made of semiconducting materials, but ferroelectrics are also natural candidates because of their internal built-in electric field. Although they are clearly uncompetitive for mainstream applications, the possibility to output high photovoltages is making these materials reconsidered for targeted applications. However, their intrinsic properties regarding electronic transport and the origin of their internal field are poorly known. Here, it is demonstrated that under intense illumination and electric field, oxygen vacancies can be controllably generated in BiFeO3 to dramatically increase the conductance of BiFeO3 single crystals to a controllable value spanning 6 orders of magnitude while at the same time triggering light sensitivity in the form of photoconductivity, diode, and photovoltaic effects. Properties of the bulk and the Schottky interfaces with gold contacts are disentangled and it is shown that bulk effects are time dependent. The photocurrent has a direction that can be set by an applied field without changing the ferroelectric polarization direction. The self-doping procedure is found to be essential in both the generation of electron hole pairs and the establishment of the internal field that separates them.