Two issues - both touched on already:
1 - For the same peak power a diesel with a broader torque curve will have better acceleration capability for a given finite number of fixed gear ratios, i.e. it's easier to stay close to peak power whilst covering the speed range. If you ran a CVT this would be largely irrelevant because the gear ratios would be adapted to hold the engine at peak power - this is easy to demonstrate in a lap sim programme.
2 - The diesels do have more peak power than the petrol cars. This is a fact of the regulations and is political because the only full factory LMP teams want to use diesels for marketing reasons.
So you could conceivably get a small benefit in lap time (particularly) at Le Mans with a diesel with the same peak horsepower as a petrol if you're stuck with 6 or 7 finite gears. But it won't be 8 seconds a lap - that's horsepower. Le Mans is a massive compromise now - a lap sim might tell you that lowering drag is vital, but if you've got a low downforce car in the Porsche curves, it's hard to go consistently quick for the hours required. If you've got an extra few HP and you can wind the wing on without dropping below the petrol cars straight-line speeds you have a massive advantage.
Ben