Shaping specificity in signaling networks