Can a turbofan have a fan driven electrically so as to run at optimal speed?
There are plans to run a turbofan-like engine with an electric motor rather than the gas generator used today. But the weight of electric engines does not promise an immediate advantage - only when the electricity is generated in a much more efficient way that what today's gas generators offer will the overall propulsion mass be lower. An example is a hydrogen-powered fuel cell somewhere in the fuselage.

We had a similar discussion here and here.