It won't gum up your needle. I have used basting spray occasionally on my longarm setup -- mostly when I was experimenting with floating the top.
If you want to use it on the sides of your quilt, it won't do any harm; I'm just not sure it will do you a whole lot of good. What I have found is that I need to apply side clamps to my quilt to keep everything squared.