Any company authorized to operate a railroad by steam is empowered to adopt electricity as its motive power, whether such railroad be wholly or only partly in the state.