Optimal Estimating Equation for Logistic Regression with Linked Data