You can go for either 45 minutes at a time, or can make sure you cover 8km. Each time you go out, try to run a little more than you did the last time. Eventually, assuming that you are in good health and take care of yourself, you should be able to run that 8km in 45 minutes.