1. He slept for 7 hours last night.

2. He slept 7 hours last night.
(Are both OK? Can we omit 'for' here?)

3. Go straight for two blocks. It's on your left.
4. Go straight two blocks. It's on your left.
(Are both OK? Can we delete 'for' here?)

5. The man went in the opposite direction.
6. The man went the opposite direction.
(Are both correct? Can we remove 'in' here?)

7.I have met Dave for three times.
8. I have met Dave three times.
(Are both OK? Can we use 'for' or delete 'for'?)

1 and 2 - both OK

3 and 4 - both OK, but 3 is more complete

5 and 6 - both OK

7 - no

8 - correct