The bore and stroke do not effect the time available to combust - only RPM's and injection timing.
You obviously need to stay within practical RPM limitations for diesel combustion and whatever fuel delivery mechanism is chosen. For the same displacement and rod ratio a longer stroke won't make any more torque on average.
While this is all true, the fact that there is essentially an upper boundary of 5000 - 6000 rpm on a diesel engine pretty much imposes a "minimum stroke" if you want to have an efficient engine.
It has to do with the mean piston speed. Gasoline engines typically have mean piston speed at redline in the 20 m/s range. The upper boundary (Formula 1 car engines, etc) is in the 26 - 28 m/s range. Diesel engines are typically a bit lower than 20 m/s at redline. For example, VW TDI with 95.5 mm stroke and 4700 rpm redline is at 15 m/s.
If you are fixed with an upper RPM boundary in that range then sure, you COULD use a shorter stroke and lower-than-necessary piston speed, but for a given displacement it results in a wider bore with more distance required for flame travel (possibly combustion problems) and it adds more area to the combustion chamber for heat loss for a given displacement (loss of efficiency), and more piston ring sealing surface (tendency towards higher leakdown). Since the forces on pistons, con-rods, and cranks is dependent on the piston area, then for a given engine displacement, a wider bore and shorter-than-necessary stroke requires heavier pistons, heavier rods, heavier
engine.
Strictly speaking, one could use a stroke even
longer than 95.5mm for a 4-cyl diesel engine in the 2.0 litre range while remaining in the target engine RPM and piston speed range, in the interest of making the bores narrower, but this would force the engine to be taller, resulting in hood clearance problems.