Soliton solutions of the non linear Schrödinger equation with an external time-dependent field