Optimal entanglement witnesses from limited local measurements