As we are simply trying to predict residuals from weak learners and aggregating them, can we use any weak learners in gradient boosting machines instead of trees ? If so, why are the all the gbm implementations like xgboost, lightgbm use trees ?
Yes, you can use learners besides trees. XGBoost implements linear learners in addition to trees.
Trees are nice because weak learners can be aggregated to become strong learners. We have several posts about this.