Wait, you're a little confused :P
It's true that "la" is the feminine accusative, but the sentence would be "darle le mele" because her would be dative, and the apples would be accusative if that form still existed.
In "she knows it", "she" is nominative and "it"/"lo" is accusative: it can refer to any masculine noun, and even to an unspecified object, as masculine tends to be the default gender.
OK, that's fine. I really got confused because I have a clitics table helping me. You might take a look into it. "A lexical analysis of Italian Clitics", by Paola Monachesi. That's why I couldn't find the respective use for "te" and "me", but I will get it soon.