1993 BMW 318 Engine Problems

My car's check engine light is now constantly on, and when I start my vehicle, it starts, then it turns off immediately. To get my car to stay on, I have to give the car some gas when it turns over, then switch it to drive real quick, and drive for at least 50 feet, or it will turn off again. After 50 feet, the car stays on and it runs perfectly fine. I recently got an oil change, and changed the four spark plugs, but two sparkplug compartments, had oil deposits. What do you think is my problem?