Yes, they are both fine. As you might guess, "I'll put it in the wash" is a plain statement of fact.
"I'll throw it in the wash" is informal. It suggests haste, or that the job of washing it is quick and easy. For example, suppose someone accidentally splashed a few drops of coffee on my shirt. Suppose they were being very apologetic. To make them relax, I might say "Oh, that's nothing at all, this fabric is stain resistant. I'll just throw it in the wash and it will come right out."