Compared with entanglement with multiple types of noise, entanglement including only one type of error is a favorable fundamental resource not only for quantum communication but also for distributed quantum computation. We consider protocols that present single-error-type entanglement for distant qubits via coherent-state transmission over a lossy channel. Such a protocol is regarded as a subroutine to serve entanglement for larger protocol to yield a final output, such as ebits or pbits. In this paper, we provide a subroutine protocol which achieves the global optimal for typical jointly convex yield functions monotonically nondecreasing with respect to the singlet fraction, such as an arbitrary convex function of a singlet fraction, two-way distillable entanglement, and two-way distillable key. Entanglement generation based on remote nondestructive parity measurement protocol [K. Azuma et al., Phys. Rev. A 85, 062309 (2012)] is identified as such an optimal subroutine.