The head of anti-terrorist operations has apologised to the Conservative Party over claims it had tried to undermine a leaks inquiry.