There are two kinds of tax you will be subject to on your earnings: income tax and national insurance.
Income tax is charged with each payslip, but the brackets apply annually (April 6th - April 5th). So even if you end up being pushed into a higher tax bracket for some of your income this month - and as Vicky notes this is unlikely - unless you end up making more than £43000 gross over the entire tax year, the total income tax you pay over the course of the year will be at most 20%.
This is normally calculated by the PAYE system automatically. If you had some 20% bracket "spare" in previous months of this tax year, then you'll get that applied this month. If you still end up paying some 40% tax in this payslip, you'll get it back in a future payslip where you get charged less tax to compensate.
National insurance is applied weekly or monthly (depending on how often you get paid) rather than being added up over the course of the year. However, national insurance actually reduces for higher incomes. The "upper earnings limit" is aligned with the higher-rate income tax bracket, and if you end up in the higher-rate tax bracket for the month, the portion of your income in that bracket will only be subject to 2% National Insurance rather than 12%.
So overall, if you have a large "spike" this month that pushes you into the higher-rate tax bracket, you may pay 40% income tax and 2% NI on that portion of the income this month, rather than 20% income tax and 12% NI. But as long as your income doesn't exceed the higher-rate threshold for the tax year as a whole, you'll get back that extra 20% income tax later in the year, and you won't be charged the extra 10% NI.