So is the gel those white squiggles that look like they hold the lamp module to the enclosure? If so, I'd just scrape it off like you proposed, get both surfaces as clean as possible, then apply some adhesive to hold it together. I'm guessing something like silicone caulk (or even non-silicone, like what we have in the US called "Liquid Nails") should work fine. There are no electrical concerns that I can see; it's just bonding the lamps to the housing.
To get rid of the corrosion, try soaking the aluminum in vinegar.