Can I get constant current at the output of a buck convertor (to drive a LED)?
Yes, it is possible to calculate the duty cycle to acheive a specific LED current, given a specific set of conditions.  If you know the 12 V supply will stay fixed, know the LED forward voltage, and use a reasonable forward drop accross the diode, then this can be done.

I actually did something like this in a commercial product, except that the power voltage was from a battery and could vary.  The formula from battery voltage to PWM duty cycle is non-linear and not easy to solve in real time in a small micro.  However, this was done with a table.  I set up the table to take the raw 8 bit A/D reading directly and produce the value to write into the PWM duty cycle register.  All the conversions and calculations (which included a divide and a square root) were performed by the preprocessor using floating point math, and the result loaded into the table at build time.  It worked quite nicely.  The LED current stayed within 10% of the target over the full battery voltage range.