Yes, but it depends on the dog. A lot of people will tell you that you're a horrible person, but there are hundreds of thousands of dogs living in shelters who barely have any human contact at all. If you can give a loving home to one of those dogs, then you're not a bad person.
It's a new concept for me, as I grew up with a mom who was home with our dogs during the day. Then, when I got my first dog as an adult, I lived in a laid-back beach town where I was able to bring him to work with me, and I spent most of my "fun" time at friends' homes, where I would bring him with me (I also had a car). Not to mention, my commute was 5 minutes so I could easily take him for a full hour-long beach walk in the morning.
I moved to New York City last summer and planned to bring him, but a coworker's family who was watching him for me while I moved guilt-tripped me into leaving him there and he gets to live that same life.
But after several months in NYC I wanted a dog again, so I recently rescued another one. This time I have no car, a 30-minute commute, a dog-free office, and almost all socializing is done out and about. At first I felt so guilty and anxious about leaving him home and having a young, busy life that I freaked out and was about to just foster him. But things have turned out great, actually!
I take him for a half hour walk in the morning and spend time with him while I get ready. After 8 hours or so, my roommate comes home and takes him for a long walk. Then we hang out with him and play/pet/love him for several hours. We take him out once or twice more to pee.
Dogs sleep on average 16 hours a day (some more or less). That means it would be normal for them to sleep all night beside you, then your entire workday. Another thing is that dogs are used to having full bladders, as they evolved to be able to "mark" their territory. So we think of even a remotely full bladder as unpleasant, it is a different sensation for dogs. This is not to say dogs don't become uncomfortable at a certain point, but my last dog was able to go out as much as he wanted (house with open doors to backyard) and he often wouldn't go for 12+ hours at a time by choice.
My new dog has been great! He was used to sitting in a crate all day because he was in shelters for at least several weeks before we got him, so he did fine. Now we let him roam free in our living room while we're gone, so he can sleep on the couch, rug, floor-- wherever he wants.
I am still able to do things like go to ballet class or on a weeknight date because my roommate is usually home every evening. If she works late, I plan to come straight home and spend time with him. If we both have to work late, I call my dog walker. He loves that because he gets to walk and play with other dogs, too.
On Fridays, if we are at work all day and then go out at night, I plan to put him in doggie daycare on those days so he has been around dogs and people all day and won't miss us one bit.
I am the kind of person who likes to stop at home after work just to re-group, even if it's out of the way, so it works.
Weekends work out well, too, because we are usually around or in-and-out throughout the days, and he gets lots of walks, park trips, and quality time with us. Then we go out around 10 or 11pm, which is his bedtime anyway, so he doesn't miss us then either.
My dog is a 6-year-old poodle mix, which is easier than, say, a border collie pup. He seems very happy, and doesn't show signs of anxiety even when we leave or come back. I will say I got really lucky with him! So far he hasn't had an accident or made any other kinds of messes. He doesn't bark a whole lot either, which is good because the other units in our building are all businesses that would not be able to handle a barking dog all day.
And I couldn't do it without my roommate! Even though he is "my" dog, she puts in just as much day-to-day time with him as I do. Without her I would feel terrible if I ever went and did anything after work.
Especially if you are young, people will tell you to not get a dog, that it's like having a kid and your life is over, but that's not true.
Some dogs are very needy and can't deal with being alone all day, even with a dog walker. If you adopt a dog, make sure to tell them that you work full-time, and they will make sure you get a dog who can handle it. A couple of dogs I tried to adopt, the shelter said it would be a bad idea, but suggested better dogs for me.
Another great option would be fostering rescue dogs. That way you can see how well you can handle a dog and find the right one for your lifestyle. I also wanted a social dog who would enjoy coming to dog-friendly bars and restaurants, since I am young and am going to be doing a lot of that.
Best of luck!