Hopefully you're talking about
unused motor oil!!
If that's the case, I'd use any dishwashing soap and clean it by hand. Make sure to thoroughly rinse the soap out, as it will attrack dirt if you don't. Don't worry about getting too much water in the carpet-- dry it with a towel and it''ll be fine.
If it's dirty motor oil, you're hosed. I'd treat it the same way, maybe try some SHOUT or something.'
If all else fails, if you've got some leftover piece of the carpet, cut a circle around the dirty spot and replace it with the new carpet. No one will ever know.
If you don't have any leftover carpet handy, you can cut a circle from under a chair or other piece of furniture that doesn't often get moved. Simply replace it with the dirty piece.
Hope this helps!
BTW, I was a carpet cleaner while still in school. It's a total scam!!