Yes. This is an old dual sport rider's trick. The oldheads in the KLR community, for instance, will commonly carry just a front tube and use it in the rear in case of dire emergency, at least long enough to get back to town to get a correct tube.
I will also add that tube patch kits take up even less space and weight, and used correctly will effect a permanent repair. I mean, if you're going to go through all the hassle of getting the tire off anyways...
I ride with Slime in my tubes. It has saved me from many annoying punctures out in the field.