Molecular dynamics simulation of the elastic properties of metal nanowires in a transverse electric field