Let R be a prime ring of characteristic different from 2 with Utumi quotient ring U and extended centroid C, F a nonzero generalized derivation of R, I an ideal of R, and f(x(1),...,x(n)) a multilinear polynomial over C which is not central valued on R. If 0 not equal a is an element of R such that a[F(u)u, F(v)v] = 0 for all u, v is an element of f(I), where f(I) is the set of all evaluations of f(x(1),...,x(n)) in I, then there exists b is an element of U such that F(x) = bx for all x is an element of R and one of the following statements holds: (1) f(x(1),...,x(n))(2) is central valued on R; (2) ab = 0.