The datasheet says the forward voltage for 25mA is around 2V so that means there'll be 10V on the resistor. So the power disipated by that resistor will be 10*0.025 or 250mW?
No, it doesn’t say that. As others said, the “absolute maximum rating” is 25mA, which means that above that will damage it. You never want to be operating right at the limit.
Everything else in the datasheet uses 10mA — every other spec is tested at that current, including the forward voltage. So 10mA is (at most) what you should be targeting.
As others have also said: you may not need to run it at its rated (10mA) current. If it’s just a status LED for diagnostics or development purposes that won’t be used in everyday use, use an even lower current so you don’t waste power in normal operation.
I like using modern emerald green (~525nm) LEDs as low-power indicators because they’re insanely efficient. One of those at 0.5mA is still almost too bright for indoor use. For a diagnostics LED, you can drive them at 0.05mA and still see them well enough indoors. That tiny current also means the dropper resistor from 12V will be dissipating much less power.