Go to the auto parts store and pick up a bottle of iso-heat fuel drier. Toss that in there with a few gallons of new fuel (don't fill it up) from a good source, ie Chevron, Texaco, Shell, Citgo. Avoid BP, 76, Arco.
Have no idea what car you have, but that sounds like water in the fuel to me. And a bottle of iso-heat costs about $1.50, so it's cheap to try and see if that's what your problem is.
And make sure that after you add the iso-heat and a couple of gallons of fuel (so it mixes well) run it until it's nearly empty and then fill up again.
Cosmos Black/Black 1995 540iA M-Sport
BMW Individual Exclusive Edition, 1 of 65 total, 9/25/95 Build