You were definitely in the wrong here. As your co-worker I would not have written you up but would have advised you not to leave meds at the bedside. As your manager, after a family member complaint, I would be forced to write you up in case that family member reported the incident to the state. I would need to have the incident documented and show that action was taken to correct it. Try not to blame your manager too much, she really had no choice but to write you up. And she's right that it's poor practice.
I have worked in LTC and I know how little time you have to pass meds to all the residents. I found it nearly impossible to get the med pass done on time while still following all the rules. However, I always made sure the meds were actually taken. If you leave a pill at the bedside, another resident may take it. This is one shortcut you really can't take because, as you learned, it will come back to bite you somehow. If the resident is slow to take pills try to convince them to take them in applesauce or pudding so you can just feed it to them and be on your way. If they won't take it right then and there, save it for later and try again. If they still won't take it for you, they have refused that medication and you can document their refusal.