This is safe. As for your second question be careful with images. If it looks even a little like the ad text is a caption/link for the image or you may be tricking people to clicking ads thinking they're text for the images this is not safe and actually one of the biggest things you can do to easily get a ban. They're very strict about being tricky with images.
If you're placing them in a way when they're obviously not related to the images you still want some content on the pages. Youre not supposed to have ads on blank pages, your site is supposed to have content to go with the ads, and they're contextual so they need some text for them to display relevant ads.