A sharp estimate on the degree of approximation to functions of bounded variation by certain operators