Can I use a nonbasic land that taps and gives me either a red or white mana if I only have red mana in my deck?
Yes, as long as you're not playing Commander

In normal decks, you can use whatever (format legal) cards you want in any combination. You can play a Plains in an all Red deck if you really want to, though it's probably a bad idea.

If you're playing Commander, there is an additional rule that says that cards must match the color identity of the commander. This means that your cards can't have any mana symbols anywhere on them that don't match one of your commander's colors. In this case, if your commander isn't at least partially white, then you can't use a land that could tap for white mana.