We study the binary Goldbach problem with one prime number in a given residue class, and obtain a mean value theorem. As an application, we prove that for almost all sufficiently large even integers n satisfying n ≢ 2(mod 6), the equation p1 + p2 = n is solvable in prime variables p1, p2 such that p1 + 2 = P3, and for every sufficiently large odd integer \({\bar n}\) satisfying \({\bar n}\) ≢ 1(mod 6), the equation p1 + p2 + p3 = \({\bar n}\) is solvable in prime variables p1, p2, p3 such that p1 + 2 = P2, p2 + 2 = P3. Here Pk denotes any integer with no more than k prime factors, counted according to multiplicity.