Example from IRS website:
Example
You were a bona fide resident of Brazil for all of 2011 and 2012. You report your income on the cash basis. In 2011, you were paid $79,800 for work you did in Brazil during that year. You excluded all of the $79,800 from your income in 2011. In 2012, you received $18,800 for work you did in 2011. You can exclude $13,100 of the $18,800 from your income in 2012. This is the $92,900 maximum foreign earned income exclusion in 2011 minus the $79,800 actually excluded in that year. You must include the remaining $5,700 in income in 2012 ($18,800 - $13,100) because you could not have excluded that income in 2011 if you had received it that year.
So, can you do it? Bonus is for the prior year work (which is still the same year in the country of residence - UK)