You should do your research about the peticular product youre using.
If it says "non toxic" its usually okay, though Id still worry about being in water.
The real problem is that its not designed to be fully submerged, you know? It might leech really badly, and that stuff has some srs bizns in it that you dont want in the tank.
Perhaps consider aquarium sealant? Its a better way, IMO. You could also try to get a really close fit, one so snug it doesnt need anything but compression to hold in place. (Measure twice, cut once! LOL)