I think what you want to do is sorta like taking the hard way out. To do what you just said, imho (never done this before, mind you) you'd need to research how to build a mold. I'd have the lamp in hand, fit it into the cavity left when removing the stock unit exactly how you want it to sit, then draw a line on both sides with a sharpie. (It'll wipe right off with lacquer thinner later.)
Now, you mix the two chemicals from the moldmaking kit in a container deep enough & wide enough to fill the recess AND leave at least an 1/8" of solid rubber beneath the part of the lamp that comes closest to the bottom of the mold (for anti-vibration reasons). The mold making stuff will want to stick to the lamp when set up, so you'll need to cover the part that will be submerged with something. You could use duct tape for example, cuz you'll never see the ugly bottom of the mold once the light is set. The mold just has to be close to support the lamp. You'll also have to coat the outside of the duct tape with a release agent - the instructions with the kit should tell you what works best. If not, smear it with a thin coat of used motor oil or Vaseline and once cured, with a little pressure from the back side, that bad boy should pop out like poop thru a goose. Immediately remove the duct tape so the oil doesn't soak thru to the lamp itself.
Very important. Cut a tiny hole in the base of the mold, wrap the wires you figure will clear the back in tape, feed 'em thru the hole, pour the molding mix to the required height, then set the lamp in place while pulling the wires semi-tight thru the back.
Once it sets up, you're good to go. Now all you've gotta do is trim away the back of the mold to fit into the recess. And then somehow figure out how to cover up the molding material - I doubt it'll accept paint. It's basically just freakin' silicone and I'd much rather see somthing like that put to good use on a females chest, but that's beside the point. Not only do you have to cover it up, BUT you've gotta make it LOOK good - why am I suddenly thinking of ta ta's again? It ain't going to be simple, assuming you're not a plastic surgeon...
That's the hard way to do it.
I've never worked with Bondo before, but it's been an industry standard for a very long time. The cavity is deep. Research how thick a layer of Bondo you can apply at a time in order for it to cure properly. Do as many layers as you need to just lightly overfill the cavity. Wet sand it down till it's perfect. Mount your light with a traditional bracket - typically two holes in the fender 'Exactly where you want them'. Paint the Bondo over, mount the lamp.