Robert,
Yes you can use the O-27 straights. They're 9 & 1/2 inches long, I usually figure 10" for off the cuff measurements.
You will want to check to make sure the track height is the same, if the O-31 is taller you'll need to shim the straights
to bring them up to the same height as the curves.
Dave