Can we use specific time when using past simple with past perfect?
This sentence doesn't sound idiomatic. If you are so keen on expressing the times of your actions, you could say:
I finished my homework at 6 am AND I went to school at 7 am.
as 6 am is obviously before 7 am.
If you want to concentrate on before then maybe 7am can be omitted:
I had finished my homework at 6 am., before I went to school.
You could also omit 6am, depending on what you want to stress:
I had finished my homework before I went to school at 7 am.