Can I convert a wall lamp into a usb socket?
While there are other options involving wiring, the safest option that does not involve an electrician is a light bulb to outlet adapter.  Here, the version for use in countries with Edison base A19 bulbs:



Someone else can add advice for other regions.  In the case of a USB socket a third prong is generally not required, though chargers in the UK generally have a plastic fake third prong anyway.