If you leave the cap off and ignite the fumes, they will burn like a blow torch out of the hole, but it won't explode. We did this with all the Jerry cans when we took them to NZ.

Once the fumes are burnt off, just weld it up in a well ventilated area.

The other option is to fill it with water (or an inert gas, like Argon) and weld it, but I'd prefer to burn off the left over fuel to doing this as it's fast and less messing around.