MS CS with thesis after online MS CS
Certainly it is theoretically possible, but it may not be possible in practice. There are two issues to consider, even beyond your unknown performance in the online degree. 

The first is that the probability of any single candidate getting in to a "top ten" program is effectively zero. There are too few slots and too many well qualified candidates. The competition for entry is intense. Most of those candidates will have near perfect academic records. You will need some "edge" that will appeal to any admissions committee. An online degree may not be that edge. 

Second, an online degree usually gives you little personal relationship to professors and, probably, very little feedback on your work. If the online degree is largely "passive" (videos, readings, and exams), then no one really has an idea of your potential since you interact with them so little. There are a few programs that are different, of course, such as Open University UK, which does provide tutors for the students, but even there, little interaction with professors. 

That doesn't mean the an online degree is bad for you and may be one of your only options. But if you set your sights on a very narrow target for it, then it will be very difficult to hit that target. Think about how you can widen your goals or, alternatively, choose a more effective path to them. Say a path that lets qualified people see your potential and give you great letters of recommendation.