Kids are prime manipulators and the really smart ones learn how to do this early, and often for the joy of exercising power and control over their world that would normally be beyond their reach. Lying in this light is probably a learned behavior, but you're right in that you need to nip it in the bud now.
Ever read the story of the Boy who cried Wolf? Get a copy from the library and read it to her. Then, tell her that since you know she lies, you are now going to treat EVERYTHING she says as a lie and not believe her. Make sure the rest of the family is in on this, too, perhaps at a family meeting, but you might want to conduct this little exercise over the weekend or on school break because I think you'd be hard pressed to get her teacher to play along with you, and you're going to need absolute consistency.
You can't just tell her that eventually no one will trust her -- 8 year olds don't have the ability to understand abstract futures and consequences fully. I would imagine she'll get pretty frustrated in short order when she's not believed about anything and even receives consequences for being truthful, because you assume she's lying. Make sure you remind her of your assumption every time you give a consequence, and don't be harsh with the consequences. For example, if she tells you she's brushed her teeth, tell her you don't believe her because her word isn't trustworthy, then march her back into the bathroom and make her do it again while you watch. Make her show you every bit of homework and even do some over because you can't be sure she didn't copy from someone, do every chore twice (if out of your sight), etc. I doubt it will take more than a few days to get the message through. -- That's step 1.
Step 2 is reestablishing trust, which is a lot harder. When you think she's gotten the message, sit down and have a talk with her, again at a family meeting, about what she can do to reestablish trust. Have her brainstorm with you ways to act to prove that she's being truthful. Make a list of 5 - 10 things, max, of what you've collectively decided, then print it out prominently on a whiteboard, poster board, etc. and put the list where it can be referred to easily as a reminder (you could make several, if you like, and place them in different areas of the house, even). Remind her to review the contract list frequently. You can both ask her for examples of when she's following the rules and catch her being good. Make sure you reward the times when she's acting appropriately, and giving consequences for when she's not. One technique I used with my kids when I needed to help them change a bad habit was to give them a pocketful of small change, like 10 nickels, dimes, or quarters to start with at the beginning of each day. Those coins became a physical reminder of what NOT to do. Every time I caught them engaging in the bad habit, I would take away a coin. They got to keep whatever they had by the end of the day. After a few days, I extended it to keeping hold of the coins for 3 days, then a week, then two weeks, after which time the positive habit had replaced the bad habit and the program stopped (until the next need for behavior modification). This method worked well for me until they were about middle school age, by which time their brains were more mature and discussion became sufficient.
If this or the other methods other mamas have suggested have no effect on her, a trip to a good child psychologist is definitely in order.
BTW, just thought of one other thing. Your daughter may have an incredibly fertile imagination and the gift of story telling. Perhaps you can turn this into a positive for her. Encourage her to write creatively about what she would otherwise lie about and make up works of short fiction that explore what might happen if the "lie" were true. This is the basis of good fictional literature. Who knows, you could end up with a budding novelist!