Characterization of a class of weak transport-entropy inequalities on the line