An electrically controlled optoelectronic switch based on a BMFET device