Electromagnetically driven relativistic jets - A class of self-similar solutions