The role of fidelity in goal-oriented semantic communication: A rate distortion approach