General criterion for oblivious remote state preparation