Electrically controlled nanophotonic devices using the phase transition of vanadium dioxide