yes, you can substitute with whatever caulking available as a means to an end.
many auto/headlight manufacturers use a
butyl type sealant which is temperature
sensitive and reusable. kind of a plumber's putty like media. you pinch out a
dab and roll into rope and push into the groove. your hand temp softens it a
little. after you press the outer lens into the housing groove, the media molds
and forms around the fitting and returns to a harder putty density, effectively
forming a custom fitted gasket.
headlight retrofitters have also applied a bead of clear silicone RTV butyl to the
exterior (like tub surround use), thereby dbl sealing the fitting. both silicone
and putty are reasonably easy to remove for servicing later. neither is an
adhesive or glue.