A functional calculus for a class of pseudodifferential operators with singular symbols