Yes, in theory you can complete on the same day the tenant vacates (or is the tenant vacating prior to this but after exchange?).
Tenants don't always take care of the property though so you may find you're moving into a property left in a poor state. We always advise our clients to view the property once it has been vacated to inspect the state/condition etc and ask the seller to make any repairs/decorations (they should be holding a deposit to cover the costs) and exchange and complete shortly thereafter.
Even if the seller has served notice on the tenant to vacate the property, there is no guarantee that the tenant will move out when they are required to and the seller may have to take Court action to get the tenant to vacate. This is a time consuming process. Bear in mind also, that if you have given your landlord notice, you could be homeless if the tenant remains. However, if the seller's solicitors have agreed to provide an undertaking, I would assume they are confident that the tenant is going to leave on 15th August. You can agree a conditional exchange of contracts with completion, say, ten working days after the tenant has vacated, which would give you time to inspect the property and/or get the seller to fix anything broken.
I'm guessing that you're being pressured to exchange so providing you're aware of the above and/or discussed the possibilities/options with your solicitor and are happy, then you can go ahead.
I'm not a solicitor though so will have a chat with my colleagues at work to see what they suggest.