Electron transmission through a potential barrier in the presence of an electromagnetic field: unitary transformation method