A guess: O2 sensor.
I would normally spout off the "routine" items that afflict the aging E30s, but Dude! You have an M3! I would STRONGLY recommend a good Independent mechanic with M motor experience. IIRC there are 10,000 mile valve adjustment intervals with the M motors. This "could" be your problem. But, without some kind of history (parts replaced recently, last tune-up) its quite difficult to diagnose.