Does logistic regression can only solve binary classification problem?
No, multiclass classification is also possible. Try reading up on 'One vs All' multiclass classification. 

https://en.wikipedia.org/wiki/Multiclass_classification

Multiclass, One vs All classification in the case of logistic regression:

https://www.coursera.org/learn/machine-learning/lecture/68Pol/multiclass-classification-one-vs-all