What the guys have already said is true.. a chunk of carbon flakes off in the combustion chamber and is first pulverized by the top of the piston then blown out of the muffler as a shower of sparks. We often see it running generator sets on a load bank. An engine that has been lightly loaded and carboned up will often do this when you take it to 100% load. Usually only visible at night.
We often mistake high rpm for heavy load. This isn't true. A diesel engine is speed governed, which means the governor will maintain the set speed regardless of applied load within the engine's capability. It doesn't take a lot more fuel to run at 100% speed compared to low idle. When you add load the exhaust temperature increases, which is what causes the carbon to flake off and burn. A diesel engine running unloaded often has an exhaust temp of no more than 200 degrees F, the same engine at full power can be over 1000 degrees F.
I've considered adding an exhaust pyrometer to mine on a few occasions, more out of curiosity than any need to monitor the exhaust temps.
Sean