A meshless stochastic algorithm for solving anisotropic transient diffusion problems based on an extension of the classical Random Walk on Spheres method is developed. Direct generalization of the Random Walk on Spheres method to anisotropic diffusion equations is not possible, therefore, we have derived approximations of the probability densities for the first passage time and the exit point on a small sphere. The method can be conveniently applied to solve diffusion problems with spatially varying diffusion coefficients and is simply implemented for complicated three-dimensional domains. Particle tracking algorithm is highly efficient for calculation of fluxes to boundaries. We present some simulation results in the case of cathodoluminescence and electron beam induced current in the vicinity of a dislocation in a semiconductor material.