I think there are two separate issues here:
1) Academics. A 3.5 GPA student who just brought home a D has definitely stumbled into some kind of big problem at school. It's unlikely that her bad grade is the result of too much after-school freedom. So, I'd deal first with the D, expressing supportive concern. What happened there? Is she feeling bad about it? Does it matter to her? Does she need help navigating some school snarl? What is it about that class that isn't working out for her? How are her other grades?
2)Freedom. Personally, my approach with my kids (both academically successful, both now grown up) was to give them lots of trust and freedom, and lots of messages that I trusted them because they were honest and trustworthy. Then they lived up to how I perceived them, most of the time.
As a 15-year-old freshman, my younger daughter had to call me if she wasn't going to be home by 6, so I wouldn't worry. Often she had debate or play practice that ran late. And two Metro buses to take. I wouldn't automatically remove freedoms in response to a bad grade unless it was clear that she was hanging with a bad crowd and didn't care about grades. But when my kids were freshmen, I also made them create a grid of things-to-be-done and a schedule of when they'd be doing them. Not punitively, but time-management is a crushing task for today's high-schoolers, and they need lots of training and support in learning it. For good students, it pretty much became true (as the kids often proclaimed) that you could only have 2 of the following: sleep, friends, good grades.