Great Stuff is a sealant used for stuffing up cracks and holes in houses. So it has to be waterproof. People use it for drip walls and stuff like that, so I doubt it will effect the water in any way.
As for silicone, just make sure you get 100% silicone. They sell stuff specifically meant for aquariums at the pet store, but it comes in tiny tubes that are hard to work with, and it costs an arm and a leg. You can find aquarium grade silicone in caulking tubes at http://www.fantasticfrogs.com. Or just do what I did and buy normal 100% silicone caulk at the hardware store. It was only $6 for the tube. While it says it's not for aquariums, I don't see how that could be possible if it really is 100% silicone, so take that with a grain of salt.
As for silicone, just make sure you get 100% silicone. They sell stuff specifically meant for aquariums at the pet store, but it comes in tiny tubes that are hard to work with, and it costs an arm and a leg. You can find aquarium grade silicone in caulking tubes at http://www.fantasticfrogs.com. Or just do what I did and buy normal 100% silicone caulk at the hardware store. It was only $6 for the tube. While it says it's not for aquariums, I don't see how that could be possible if it really is 100% silicone, so take that with a grain of salt.