Yes, it's OK.
You can put the punctuation marks after 'a' and 'm' if you like, but not everyone does.
Either 3 a.m. or 3 am is acceptable.
Don't put the colon : between the numbers, though.
2015年6月23日
1
1
1
I usually write "3 am" - this is normal.
If you want to use the 24 hour clock e.g. for professional reasons, you could write "03:00" (you don't need to add "am" here)