Substrate mediated mechanical forces enable optimal kinetic proofreading by T-cell receptors