DF Robot Shop Motor Commands

Rather than spinning around endlessly, I really want it to spin 30 degrees left or right

Not possible without some form of feedback to know how much the heading has changed.

I think I need to re-write the code so that the motors only spin for 300 or 400 milliseconds before stopping and waiting for the next command.

That's a different story. Only with experimenting on one kind of surface will you know how long to turn to achieve some change in heading.

I've looked at some of the "timer" libraries on the Arduino forum but they dont' really appear to be what I'm looking for.

You need to know when you started a turn (using millis() to record when the turn started), and turn while now (use millis(), again) minus then (when the turn started) is less than some value.