"Be careful of keeping her shoes clean" literally means "There are dangers of keeping her shoes clean and you should be cautious about them." But I have never heard it said by people who intended it that way. Every time I have heard that statement made, the person had intended to mean "Make sure she doesn't get her shoes dirty."
As user514428 said, normally careful to is a reminder to make sure something is done, and careful of is looking out for a hazard. But you should also be aware that be careful of is often used in the incorrect manner in which your second example uses it. Humans are not always the most logical thinkers and thus not always the most logical speakers. This is commonly evident in English usage. My studies of other languages never really got anywhere, but I'm pretty sure it's also true for German, Spanish, Latin, Italian, French, and Japanese. I would guess it's true for all of the languages we've made to communicate with each other.
I've been told that it's just a matter of considering what would be reasonable for the sentence to mean. For example, in this case, it would be reasonable to assume that the girl's caretakers would not want the shoes to be dirty, so it's probable that they're trying to warn against them getting dirty. However, I've met enough people to know that while that works in this case, different people are sufficiently different that it doesn't work in all cases.