An electric motor would need to supply a lot of horsepower and it might be just as heavy as a gearbox. The aircraft would also need at least one large generator to supply power to it. Stopping a rotor blade in flight comes with its own set of aerodynamic problems.
But anything is possible, all engineering design is a compromise and let's not forget that most things in engineering have been tried already. There's nothing much simpler than a driveshaft turning a gearbox.