How can I replace this lamp socket?
They are most likely "quick-wired", like the back-stab connections on the back of cheap receptacles.

WITH THE CORD UNPLUGGED, look to see if there are small holes or slots next to where the wire is stuck in. Open a paper clip and insert it into those holes/slots. This should release the wires.