Yes, of course you can.
Just you may have to be careful in terms of personal tax and make sure you document everything properly.
Let me make an example:
In the account of your limited company are 100.000 GBP. If you would wait for the tax return to be done as let's assume you would have to pay 30.000 GBP in taxes, there would be 70.000 GBP left which you can transfer to yourself and you would have to pay personal tax for.
If you instead take 100.000 GBP out and put 70.000 GBP back you need to make sure that you don't pay personal taxes on 100.000 GBP and then later pay back the missing 30.000 GBP from after tax money. This can be tricky if there is a lot of time in between.
Talking to a tax adviser would usually be a good idea.