Transformers for lamps