It's possible. I have macros that switch entire crosshotbars, as well as some that dynamically swap specific slots.

If I am understanding your setup, what I think you need are copies of those two hotbars places elsewhere (i.e. #7, #8, etc), and then use them as your macro source for swapping in and out to your #1 and #2 bars. You will probably also want those source hotbars to not be in shared mode. Keep it contained to your RDM job.

If it's something else, let me know. I can log in later and check my macros to provide you with more details.

If you only need to swap out a couple of skills back and forth, there's a way to do it. As an example, on my WAR I have defiance-only skills macroed to replace deliverance-only skill slots when I switch into defiance from deliverance. And vice-versa.

The macro command help list in-game shows how to set that up. Each hotbar slot has its own prefix.