Electromagnetically Driven Relativistic Jets: A Class of Self-similar Solutions