Is it okay to shut off the cold water(blue tubing) to the water heater with the main water still on?
Yes, but...


Turn off the water heater first. You don't want the elements heating without a full tank. Be sure to fill it completely before turning it back on. 
Expect some residual pressure for a bit. Open a few taps low in the house to help.