Thank you for the reply. I had looked at Makevars before, but I was not sure how exactly to use it.
Had I been able to access the compiler by some name, say gccv6, or by specifying a flag to gcc, it would be easy I could set a variable in the Makevars file. However, the only way I am aware I can access the higher version gcc is by using scl enable devtoolset-6 bash, which would ensure that the gcc command is tied to the new compiler.
Now that I think of it, it seems that adding source scl_source enable devtoolset-6 to my .bashrc might work. Unfortunately, I cannot verify this at the moment since there are some other issues with the Rstudio server installation.