Yes. Many folks use glue. I prefer tacky white glue that I get at a craft store but I have heard of everything from Super Glue to Liquid Nails.
I've had good luck using Liquid Nails for Projects (since I use a lot of foam, I always get the "for Projects" version) on both my home layout and on all of the NTrak modules that I've built. After a few years of lugging my modules around to various shows, I haven't seen any signs of lifting from the track or the cork.
Adhesives for laying track Based on the fact that you even asked this question, you probably want to go with an adhesive that's 'undoable'. Search the archives of this and other n scale forums for threads on this subject. It's a common (minor) hurdle faced by most newcomers to model railroading in all scales. I'd suggest you consider white glue, but beware. It has some drawbacks. You aren't going to push nails into plywood no matter how hard you try. That's one of plywood's strengths - the ability to hold fasteners.
I use a product called Lepage's Contact Cement. It has no fumes and it's non toxic. It goes on white and dries clear. It secures the track very well and if you need to take the track up, just use a razor knife.