High-bandwidth electrical generation of single and entangled photons