Potential algebra approach to quantum mechanics with generalized uncertainty principle