On quantization of singular varieties and applications to D-branes