Nondestructive one- and two-dimensional doping profiling by inverse methods