How long must I allow the debtor before paying the court fee and starting the official proceedings?

Also, if I've paid the court fee and the debtor pays the debt before the case is heard, do I still have recourse to them for the court fee?
Its all vague , you must remember that even if you win your case then the court can only make the payee repay any monies at a rate that they can afford.
If they have the means to repay you but simply refuse to, then start court action asap, however if they intend to repay you but do not have the funds then a court will not be able to make them pay what they do not have.
Its all a matter of what is reasonable and that depends on how much money you are talking about and the financial status of the debtor.
Even if they can not pay you in full they should start to make payment by instalments.

If you start court action and they then pay up, you can add your costs to date to the total bill, and if they refuse to pay for your costs then simply proceed with the court action and claim your expenses through the courts.
It depends on the term of your loan agreement. If you had in your loan agreement that the borrower was responsible for court costs, then sure.

As far as timing goes, you can file as soon as they are one day late with payment if you think they might not pay at all. I would start with a reminder phone call, then if they don't pay within 3 days, a letter, and if they don't pay a week after that, go to court.