Get yourself some DAP Alex Plus with Silicone, the stuff that says 'dries clear' on it. It's white, but it does dry clear.
You want a thin metal spatula and a decent caulking gun. When you deposit your caulking bead, you want just a little, pencil thin, and spread it thin like vegamite or thin margarine. Set your cork or track elements over the centreline, insert a couple of track nails here and there while you place soda cans or beer cans, or soup cans over the rails on their sides. Stacks of magazines work well, even paperbacks or hard-cover books.
For foam on foam, I use PL 300. It gets quite hard, not like epoxy or concrete, but like a hockey puck when it cures. It works well on wood to foam, foam to foam, plaster castings to foam and wood, etc. Once you bond two layers of foam with PL 300, you won't be getting it apart again...not without it turning into smaller chunks.