But gasoline doesn't produce the same soot. Plainly put, diesel particulates are more toxic than particulates from gasoline combustion. Modern diesels, however, are much, much more clean than older diesels. I drove a diesel rental car in Turkey recently that was diesel and its exhaust just smelled like steam.
Diesel engines have two problems when it comes to pollution. Particulates and NOx emissions. Particulates can be eliminated with by increasing the heat and pressure of combustion. That takes care of most immediate, toxic product of combustion right there. However, increasing heat and pressure also leads to more N2 reacting with O2 to make NOx, which causes smog and acid rain, also serious human health concerns. If you go the other way and cool combustion way down, you can virtually eliminate NOx, but you get tons of particulates. So either reduce NOx by cooling combustion with recirculated exhaust gasses and stick on a filter to catch and burn particulates (the dreaded regen cycle that truckers can tell you about), or turn up the heat and treat NOx separately using a catalyst, urea. Most auto makers are finding that urea into the exhaust works best because the engine can be super simple again. However the big problem with this is that in northern climates (most of the western world), cars don't drive far enough to warm up completely, so you still have unwanted pollution.
Gasoline (petrol) does emit some particulates but they seem to not be as dangerous. Petrol engines also emit NOx but modern catalytic converters convert it to N2 and water.
And of course all fossil fuels emit net CO2. Biofuels can theoretically be carbon neutral, but if they are diesel-like (burn in a diesel engine) they still very much have the same pollution issues as diesel, and will have to be treated in the exact same way, using EGR, SCR (with urea), or some other technology. Likewise gasoline-like biofuels will still have to have the same pollution control systems as regular gasoline engines.