Yes it can work I do shift work whic means 12 hour days or nights my dog copes very wel, she has a cat to keep her company and they get on very well. I generally work 3 shifts in a row and then have days off, which are spent with my dog she gets quality time from me before and after work and also on my days off. On the rare occassion I have to do 4 nights in a row I book both Sparkles and her cat into their holiday resort so they can have the attention and care they need and deserve allowing me get the sleep I need without neglecting them.
I choose my breed of dog carefully and spent time getting her used to being left alone, she has plenty of toys and I leave some biscuits hidden so she can hunt for them while I am away. If the weather is going to be very hot I put the airconditioner on timer and make sure there is a cool room they can go to if necessary , she also has free access to the backyard. My neighbours are very good and if necessary would phone me at work if they thought either of my pets needed me to come home. Sparkles is so happy with the arrangement my neighbour never hears her barking and rarely sees her outside.
In a nutshell yes you can work long hours and have a dog but you must do your homework and be prepared to give quality time to your dog when you are at home, just going for a walk isn't enough.